package datastructure.recursion;


/*
 * A Magic Square contains a certain bunch of numbers, 
 * in this case, 1..9, each of which has to be filled once into the grid. 
 * The 'magic' property of a Magic Square is that the sum of the numbers in the 
 * rows and columns and diagonals should all be same, in this case, 15
 * 
 * for i = 1 to 3 
    for j = 1 to 3 
        for k = 1 to 3 
            print i,j,k 
 */
public class MagicSquares {
	int A[][][];
	
//	void Func(int n) 
//	{ 
//	    for(int i = 1; i <= 3; i++) 
//	    { 
//	       A[n] = i;
//	       if (n < 3) 
//	            Func(n+1) 
//		else
//		    print A[1],A[2],A[3]
//	    } 
//	} 
	
	public static void main(String[] args) {
		int n =20;
		while(n > 0) {

			// number below 20
			int i = (int) ( Math.random() * (20));
			
			// number in range 5-50
			i = 5 + (int) ( Math.random() * (50-5));
			
			System.out.println(i);
			n--;
		}
		
		
//		for(int i = 1; i <= 3; i++) 
//			for(int j = 1; j <= 3; j++) 
//				for(int k = 1; k <= 3; k++) 
//			           System.out.println(i+" "+j+" "+k); 
	}
	

}
